package org.sixtythousand.joker.servlet.servlet;

import javax.servlet.Servlet;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.nio.charset.StandardCharsets;

/**
 * @author zhoulk
 * @date 2023/10/19 9:27
 * @desc
 */
public class DefaultServlet extends HttpServlet {


    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        super.doGet(req, resp);
        String content = "Hello, World!";
        resp.getOutputStream().write(content.getBytes(StandardCharsets.UTF_8));
        resp.flushBuffer();
    }
}
